﻿using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;


namespace SharedFeatures;

public class 日志记录 : DbContext
{
    private static readonly ILoggerFactory MyLoggerFactory = LoggerFactory.Create(builder => { builder.AddConsole(); });

    protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
    {
        // 注册日志记录器工厂
        optionsBuilder.UseLoggerFactory(MyLoggerFactory);
    }

}
